package net.oschina.allchat.message.processing;


public class ProcessingDescriptor<T> implements IProcessingDescriptor<T> {
	private IParserFactory<T> parserFactory;
	private ITranslatorFactory<T> translatorFactory;
	
	public ProcessingDescriptor(IParserFactory<T> parserFactory, ITranslatorFactory<T> translatorFactory) {
		if (parserFactory == null) {
			throw new IllegalArgumentException("Null parser factory");
		}
		
		/*if (translatorFactory == null) {
			throw new IllegalArgumentException("Null translator factory");
		}*/
		
		this.parserFactory = parserFactory;
		this.translatorFactory = translatorFactory;
	}
	
	@Override
	public IParserFactory<T> getParserFactory() {
		return parserFactory;
	}
	
	@Override
	public ITranslatorFactory<T> getTranslatorFactory() {
		return translatorFactory;
	}
}
